const CW = [
  {
    name: '销售毛利率',
    field: 'selRint',
    range: [
      { n: '小于20%', r: '[,20]' },
      { n: '20%~50%', r: '[20,50]', },
      { n: '50%~70%', r: '[50,70]', },
      { n: '大于70%', r: '[70,]', },
    ]
  }, {
    name: '市盈率',
    field: 'shiyingPe',
    range: [
      { n: '小于0', r: '[,0]' },
      { n: '0~25', r: '[0,25]' },
      { n: '25~50', r: '[25,50]' },
      { n: '大于50', r: '[50,]' },
    ]
  }, {
    name: '市净率',
    field: 'shijingPb',
    range: [
      { n: '小于1', r: '[,1]' },
      { n: '1~3', r: '[1,3]' },
      { n: '3~5', r: '[3,5]' },
      { n: '大于5', r: '[5,]' },
    ]
  }, {
    name: '市销率',
    field: '',//null
    range: [
      { n: '0~1', r: '[0,1]' },
      { n: '1~2', r: '[1,2]' },
      { n: '2~5', r: '[2,5]' },
      { n: '大于5', r: '[5,]' },
    ]
  }, {
    name: '净利润增长率',
    field: 'risMnp',
    range: [
      { n: '小于0%', r: '[,0]' },
      { n: '0%~30%', r: '[0,30]' },
      { n: '30%~100%', r: '[30,100]' },
      { n: '大于100%', r: '[100,]' },
    ]
  }, {
    name: '营业收入增长率',
    field: 'salRatY3',
    range: [
      { n: '小于0%', r: '[,0]' },
      { n: '0%~30%', r: '[0,30]' },
      { n: '30%~100%', r: '[30,100]' },
      { n: '大于100%', r: '[100,]' },
    ]
  }, {
    name: '每股收益',
    field: 'epsp',
    range: [
      { n: '小于0元', r: '[,0]' },
      { n: '0元~0.5元', r: '[0,0.5]' },
      { n: '0.5元~1元', r: '[0.5,1]' },
      { n: '大于1元', r: '[1,]' },
    ]
  }, {
    name: '每股收益增长率',
    field: 'epsRate',
    range: [
      { n: '小于0%', r: '[,0]' },
      { n: '0%~30%', r: '[0,30]' },
      { n: '30%~100%', r: '[30,100]' },
      { n: '大于100%', r: '[100,]' },
    ]
  }, {
    name: '净利润',
    field: 'incI',
    range: [
      { n: '小于0亿', r: '[,0]' },
      { n: '0~1亿', r: '[0,100000000]' },
      { n: '1~10亿', r: '[100000000,1000000000]' },
      { n: '大于10亿', r: '[1000000000,]' }
    ]
  }, {
    name: '每股净资产',
    field: 'bps',
    range: [
      { n: '小于3', r: '[,3]' },
      { n: '3~5', r: '[3,5]' },
      { n: '大于5', r: '[5,]' }
    ]
  }, {
    name: '每股现金流',
    field: 'psCn',
    range: [
      { n: '小于0元', r: '[,0]' },
      { n: '0元~0.3元', r: '[0,0.3]' },
      { n: '0.3元~0.5元', r: '[0.3,0.5]' },
      { n: '大于0.5元', r: '[0.5,]' }
    ]
  }, {
    name: '每股未分配利润',
    field: 'psUp',
    range: [
      { n: '小于0元', r: '[,0]' },
      { n: '0元~1元', r: '[0,1]' },
      { n: '1元~3元', r: '[1,3]' },
      { n: '大于3元', r: '[3,]' }
    ]
  }, {
    name: '每股资产公积金',
    field: 'capPs',
    range: [
      { n: '小于1元', r: '[,1]' },
      { n: '1~2元', r: '[1,2]' },
      { n: '2~5元', r: '[2,5]' },
      { n: '大于5元', r: '[5,]' }
    ]
  }, {
    name: '净资产收益率',
    field: 'duRoe',
    range: [
      { n: '小于0%', r: '[,0]' },
      { n: '0%~5%', r: '[0,5]' },
      { n: '5%~15%', r: '[5,15]' },
      { n: '大于15%', r: '[15,]' }
    ]
  }, {
    name: '每股股利',
    field: '',//null
    range: [
      { n: '小于0.2元', r: '[,0.2]' },
      { n: '0.2~0.5元', r: '[0.2,0.5]' },
      { n: '大于0.5元', r: '[0.5,]' }
    ]
  }, {
    name: '资产负债率',
    field: 'capLab',
    range: [
      { n: '小于10%', r: '[,10]' },
      { n: '小于30%', r: '[,30]' },
      { n: '小于50%', r: '[,50]' },
      { n: '小于70%', r: '[,70]' },
    ]
  }
]

const HQ = [
  {
    name: '量比',
    field: 'volumeRatio',
    range: [
      { n: '小于1', r: '[,1]' },
      { n: '1~3', r: '[1,3]' },
      { n: '3~5', r: '[3,5]' },
      { n: '大于5', r: '[5,]' },
    ]
  }, {
    name: '涨跌幅',
    field: 'priceChg',
    range: [
      { n: '小于-5%', r: '[,-5]' },
      { n: '-5%~0%', r: '[-5,0]' },
      { n: '0%~5%', r: '[0,5]' },
      { n: '大于5%', r: '[5,]' }
    ]
  }, {
    name: '委比',
    field: 'entrustRatio',
    range: [
      { n: '小于0%', r: '[,0]' },
      { n: '0%~30%', r: '[0,30]' },
      { n: '30%~50%', r: '[30,50]' },
      { n: '大于50%', r: '[50,]' }
    ]
  }, {
    name: '振幅',
    field: 'amplitude',
    range: [
      { n: '小于1%', r: '[,1]' },
      { n: '1%~5%', r: '[1,5]' },
      { n: '5%~10%', r: '[5,10]' },
      { n: '大于10%', r: '[10,]' }
    ]
  }, {
    name: '换手率',
    field: 'turnoverRatio',
    range: [
      { n: '小于3%', r: '[,3]' },
      { n: '3%~5%', r: '[3,5]' },
      { n: '5%~10%', r: '[5,10]' },
      { n: '大于10%', r: '[10,]' }
    ]
  }, {
    name: '成交量',
    field: 'tradeVolumeMonth3',
    range: [
      { n: '小于100万', r: '[,1000000]' },
      { n: '100万~300万', r: '[1000000,3000000]' },
      { n: '300万~500万', r: '[3000000,5000000]' },
      { n: '大于500万', r: '[5000000,]' }
    ]
  }, {
    name: '成交额',
    field: 'tradeValue',
    range: [
      { n: '小于500万', r: '[,5000000]' },
      { n: '500万~1000万', r: '[5000000,10000000]' },
      { n: '1000万~5000万', r: '[10000000,50000000]' },
      { n: '大于5000万', r: '[50000000,]' },
    ]
  }, {
    name: '股价',
    field: 'priceNow',
    range: [
      { n: '小于5元', r: '[,5]' },
      { n: '5元~10元', r: '[5,10]' },
      { n: '10元~30元', r: '[10,30]' },
      { n: '大于30元', r: '[30,]' },
    ]
  }, {
    name: '是否涨跌停',
    field: 'tradeLimit',
    range: [
      { n: '涨停股', r: '1' },
      { n: '非涨停股', r: '0' },
    ]
  }
]

const JB = [
  {
    name: '总股本(股)',
    field: 'sharesTotal',
    range: [
      { n: '小于2亿', r: '[,200000000]' },
      { n: '2~5亿', r: '[200000000,500000000]' },
      { n: '5~10亿', r: '[500000000,1000000000]' },
      { n: '大于10亿', r: '[1000000000,]' },
    ]
  }, {
    name: '流通股本(股)',
    field: 'sharesFlow',
    range: [
      { n: '小于2亿', r: '[,200000000]' },
      { n: '2~5亿', r: '[200000000,500000000]' },
      { n: '5~10亿', r: '[500000000,1000000000]' },
      { n: '大于10亿', r: '[1000000000,]' },
    ]
  }, {
    name: '总市值',
    field: 'marketVal',
    range: [
      { n: '小于50亿', r: '[,5000000000]' },
      { n: '50~100亿', r: '[5000000000,10000000000]' },
      { n: '100~500亿', r: '[10000000000,50000000000]' },
      { n: '大于500亿', r: '[50000000000,]' },
    ]
  }, {
    name: '流通市值',
    field: 'flowVal',
    range: [
      { n: '小于50亿', r: '[,5000000000]' },
      { n: '50~100亿', r: '[5000000000,10000000000]' },
      { n: '100~500亿', r: '[10000000000,50000000000]' },
      { n: '大于500亿', r: '[50000000000,]' },
    ]
  }
]

const JD = [
  {
    name: '连阴天数',
    field: 'lianxuDaysYing',
    range: [
      { n: '2天', r: '2' },
      { n: '3天', r: '3' },
      { n: '5天', r: '5' },
      { n: '5天以上', r: '[5,]' },
    ]
  }, {
    name: '连阳天数',
    field: 'lianxuDaysYang',
    range: [
      { n: '2天', r: '2' },
      { n: '3天', r: '3' },
      { n: '5天', r: '5' },
      { n: '5天以上', r: '[5,]' },
    ]
  }, {
    name: '连涨天数',
    field: 'lianxuDaysZhang',
    range: [
      { n: '2天', r: '2' },
      { n: '3天', r: '3' },
      { n: '5天', r: '5' },
      { n: '5天以上', r: '[5,]' },
    ]
  }, {
    name: '连跌天数',
    field: 'lianxuDaysDie',
    range: [
      { n: '2天', r: '2' },
      { n: '3天', r: '3' },
      { n: '5天', r: '5' },
      { n: '5天以上', r: '[5,]' },
    ]
  }, {
    name: '连续涨跌停天数',
    field: 'continueLimitDays',
    range: [
      { n: '2天', r: '2' },
      { n: '3天', r: '3' },
      { n: '5天', r: '5' },
      { n: '5天以上', r: '[5,]' },
    ]
  }, {
    name: '1周涨跌幅 (5交易日)',
    field: 'priceChgWeek',
    range: [
      { n: '小于-30%', r: '[,-30]' },
      { n: '-30%~-10%', r: '[-30,-10]' },
      { n: '-10%~0%', r: '[-10,0]' },
      { n: '0~10%', r: '[0,10]' },
      { n: '10%~30%', r: '[10,30]' },
      { n: '大于30%', r: '[30,]' },
    ]
  }, {
    name: '1月涨跌幅 (20交易日)',
    field: 'priceChgMonth',
    range: [
      { n: '小于-50%', r: '[,-50]' },
      { n: '-50%~-30%', r: '[-50,-30]' },
      { n: '-30%~-10%', r: '[-30,-10]' },
      { n: '-10%~0%', r: '[-10,0]' },
      { n: '0%~10%', r: '[0,10]' },
      { n: '10%~30%', r: '[10,30]' },
      { n: '30%~50%', r: '[30,50]' },
      { n: '大于50%', r: '[50,]' }
    ]
  }
]

const UP = [
  { name: '早晨之星', field: '1008' },
  { name: '曙光初现', field: '1106' },
  { name: '好友反攻', field: '1107' },
  { name: '旭日初升', field: '1110' },
  { name: '钳子底', field: '1114' },
  { name: '看涨反冲', field: '1116' },
  { name: '弃婴', field: '1117' },
  { name: '多头镊底', field: '1118' },
  { name: '看涨三线直击', field: '1120' },
  { name: '向上跳空并列阴阳线', field: '1121' },
  { name: '上升跳空三法', field: '1122' },
  { name: '向上跳空并列阳线', field: '1123' },
  { name: '梯底', field: '1124' },
  { name: '竖状三明治', field: '1125' },
  { name: '十字启明星', field: '1126' },
  { name: '三内升', field: '1127' },
  { name: '三外升', field: '1128' },
  { name: '看涨倒锤头', field: '1129' },
  { name: '看涨孕线', field: '1130' },
  { name: '看涨吞没', field: '1131' },
  { name: '看涨十字星', field: '1132' },
  { name: '奇特三川底', field: '1133' },
  { name: '天量法则', field: '1134' },
  { name: '四串阴', field: '1135' },
  { name: '出水芙蓉', field: '1136' },
  { name: '创新高', field: '1137' },
  { name: '蜻蜓点水', field: '1138' },
  { name: '低开大阳线', field: '1139' },
  { name: '跳空缺口', field: '1140' },
  { name: '强势整理', field: '1141' },
  { name: '红三兵', field: '2001' },
  { name: '上升三法', field: '3002' },
  { name: '多头排列', field: '4001' },
  { name: '老鸭头', field: '4002' },
  { name: '低点搜寻', field: '4003' },
  { name: '突破', field: '4004' },
]

const DOWN = [
  { name: '吊颈', field: '1005' },
  { name: '射击之星', field: '1006' },
  { name: '黄昏之星', field: '1010' },
  { name: '墓碑', field: '1012' },
  { name: '乌云盖顶', field: '1105' },
  { name: '淡友反攻', field: '1108' },
  { name: '倾盆大雨', field: '1111' },
  { name: '钳子顶', field: '1113' },
  { name: '四串阳', field: '1142' },
  { name: '创新低', field: '1143' },
  { name: '高开大阴线', field: '1144' },
  { name: '黑三兵', field: '2002' },
  { name: '两只乌鸦', field: '2003' },
  { name: '三只乌鸦', field: '2004' },
  { name: '相同低价', field: '3001' },
  { name: '剑', field: '4101' },
  { name: '空头排列', field: '4102' },
]

const OTHER = [
  { name: '倒转锤头', field: '1003' },
  { name: '阳夹阴', field: '1101' },
  { name: '阴夹阳', field: '1102' },
  { name: '阳吞阴', field: '1103' },
  { name: '阴吞阳', field: '1104' },
  { name: '搓揉线', field: '1109' },
  { name: '穿头破脚', field: '1112' },
  { name: '身怀六甲', field: '1115' },
  { name: '锤头', field: '1001' },
]


const TSZB = [
  { name: '趋势长盈', field: 'qscyDragonScaleLine', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '多空决策（短线）', field: 'dkjcShortBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '多空决策（中线）', field: 'dkjcMiddleBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '冰火量能', field: 'bhlnEnergyBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '主力筹码', field: 'zhcmBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '短线寻龙', field: 'dxxlBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '双龙博弈', field: 'slbyBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '机构能量', field: 'jgnlBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '牛熊天机', field: 'nxtjBsSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '资金动量', field: 'fundMotionSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '资金深度', field: 'fundDepthSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '主力资金（2日）', field: 'mainFundSignDay2Signal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '主力资金（3日）', field: 'mainFundSignDay3Signal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '主力资金（5日）', field: 'mainFundSignDay5Signal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '散户资金', field: 'retailFundSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },
  { name: '净资金流', field: 'netFundSignal', index: -1, range: [{ n: '看多', r: '1' }, { n: '看空', r: '2' }] },

]
const JGZB = [
  { name: '三花战法（私募增持+高管异动+席位异动）', field: 'jgzb_sm_gg_xw' },
  { name: '两花战法（私募增持+席位异动）', field: 'jgzb_sm_xw' },
  { name: '两花战法（高管增持+席位异动）', field: 'jgzb_gg_xw' },
  { name: '两花战法（高管增持+私募增持）', field: 'jgzb_gg_sm' },
  { name: '一花（私募增持）', field: 'jgzb_sm' },
  { name: '一花（高管增持）', field: 'jgzb_gg' },
  { name: '一花（席位异动）', field: 'jgzb_xw' },
]

const SC = [
  { name: '沪市A股', field: 'market-SH' },
  { name: '深市A股', field: 'market-SZ' },
  // { name: '深市主板', field: 'SZ-1' },
  { name: '创业板', field: 'market-6' },
  { name: '中小板', field: 'market-2' },
  { name: '科创板', field: 'market-8' },

]



const BK = [
  { name: '行业板块', field: '1010' },
  { name: '概念板块', field: '2010' },
  { name: '地域板块', field: '3010' },
  { name: '风格板块', field: '4010' },
  // { name: '申万行业', field: '1021' },
]

import {getblockList} from "../api/index";
BK.map(async item =>
{
  console.log(item)
  const res = await getblockList({ blockType: item.field });
  console.log(res,'=====res====')
  const list = res.data.data.map(item =>
  {
    item.n = item.stockName;
    item.r = item.stockId;
    return item
  })
  item.range = list
})



//机构指标
const jgzbSelect = {
  jgzb_sm_gg_xw: {
    priFundAdd: '1',
    managerAdd: '1',
    seatAdd: '1'
  },
  jgzb_sm_xw: {
    priFundAdd: '1',
    seatAdd: '1'
  },
  jgzb_gg_xw: {
    managerAdd: '1',
    seatAdd: '1'
  },
  jgzb_gg_sm: {
    managerAdd: '1',
    priFundAdd: '1'
  },
  jgzb_sm: {
    priFundAdd: '1'
  },
  jgzb_gg: {
    managerAdd: '1'
  },
  jgzb_xw: {
    seatAdd: '1'
  }
}


// const XGMX = [
//   { name: '先锋1号', field: 'poolXF_1' },
//   { name: '先锋2号', field: 'poolXF_2' },
//   { name: '急先锋', field: 'poolXF_0' },
// ]



const xgList = [
  { n: '财务指标', v: CW, s: true },
  { n: '行情指标', v: HQ, s: true },
  { n: '基本面', v: JB, s: true },
  { n: '阶段表现', v: JD, s: true },
]

const scflk = [
  { n: '市场分类', v: SC },
  { n: '板块分类', v: BK, s: true, h: true }
]
const xtwqk = [
  { n: '上涨形态', v: UP },
  { n: '下跌形态', v: DOWN },
  { n: '其他形态', v: OTHER },
]
const zbwqk = [
  { n: '特色指标', v: TSZB, s: true },
]
const jgwqk = [
  { n: '机构指标', v: JGZB },
]
// const xgmxk = [
//   { n: '选股模型', v: XGMX },
// ]

const xgdyk = xgList.map((item) =>
{
  item.v.map(i =>
  {
    i.index = -1;
    return i;
  })
  return item;

});


const sbql = [
  { field: "qscyDragonScaleLine", name: "趋势长盈--看多", val: "1" },
  { field: "dkjcShortBsSignal", name: "多空决策（短线）--看多", val: "1" },
  { field: "bhlnEnergyBsSignal", name: "冰火量能--看多", val: "1" }
]
// const xfzf = { field: "poolXF_1", name: "先锋1号" };
const shzf = { name: '三花战法（私募增持+高管异动+席位异动）', field: 'jgzb_sm_gg_xw' };

/**
  scflk 市场分类库
  xgdyk 选股弹药库
  xtwqk 形态武器库
  zbwqk 指标武器库
  jgwqk 机构武器库
  xgmxk 选股模型库
  shzf 三花战法
  sbql 三步擒龙
  xfzf 先锋战法
  jgzbSelect 机构指标组合
 */

export { scflk, xgdyk, xtwqk, zbwqk, jgwqk, shzf, sbql, jgzbSelect };

